package br.net.atasacramental.trimestre.model;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Transient;

import org.hibernate.annotations.Formula;
import org.hibernate.annotations.GenericGenerator;

import br.net.atasacramental.atividade.model.EventoData;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Table;

@Entity
@Table(name="TRIMESTRE")
public class Trimestre{

	@Id 
	@Column(name="ID_TRIMESTRE")
	@GenericGenerator(name="seq_trimestre" , strategy="increment")
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="seq_trimestre")
	private int idTrimestre;	
	@Column(name="ANO")	
	private int ano;
	@Column(name="NR_TRIMESTRE")	
	private int nrTrimestre;
	@Column(name="SN_ABERTO")	
	private String snAberto;
	@Formula("CONCAT(NR_TRIMESTRE,'&ordm; trim. de ',ANO)")	
	private String dsTrimestre;
	@Transient
	private List<EventoData> dtDisponivel;
	

	public Trimestre(){
		super();
	}
	
	public int getIdTrimestre(){
		return this.idTrimestre;
	}
	public void setIdTrimestre(int idTrimestre){
		this.idTrimestre = idTrimestre;
	}	
	public int getAno(){
		return this.ano;
	}
	public void setAno(int ano){
		this.ano = ano;
	}	
	public int getNrTrimestre(){
		return this.nrTrimestre;
	}
	public void setNrTrimestre(int nrTrimestre){
		this.nrTrimestre = nrTrimestre;
	}	
	public String getSnAberto(){
		return this.snAberto;
	}
	public void setSnAberto(String snAberto){
		this.snAberto = snAberto;
	}

	public String getDsTrimestre() {
		return dsTrimestre;
	}
	public void setDsTrimestre(String dsTrimestre) {
		this.dsTrimestre = dsTrimestre;
	}

	public List<EventoData> getDtDisponivel() {
		return dtDisponivel;
	}

	public void setDtDisponivel(List<EventoData> dtDisponivel) {
		this.dtDisponivel = dtDisponivel;
	}
}